package com.heima.enums;

import com.fasterxml.jackson.annotation.JsonValue;

public enum Status {
    STATUS_0(0),
    STATUS_1(1);

    private final int value;
    Status(int value){
        this.value = value;
    }
    @JsonValue
    public int getValue(){
        return value;
    }
    public static Status fromBoolen(Boolean status){
        return status? STATUS_1:STATUS_0;
    }
}
